/*
 * @Author: your name
 * @Date: 2020-08-26 16:46:28
 * @LastEditTime: 2020-08-26 16:51:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \xmgj-app-new\js\containers\logistics-platform\components\detail_box.js
 */
import React, { Component } from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { px2dp } from '@/styles';
import LinearGradient from 'react-native-linear-gradient';

/**
 * @modifyAuthor kanglang
 * @description 联盟运力卡片cell
 * @createDate 2020/8/24
 */

export default class DriverDetail extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    const { boxTip, boxValue, style } = this.props;
    return (
      <View style={[styles.twoBox, style]}>
        <Text style={styles.numStyle}>{boxValue}</Text>
        <LinearGradient
          style={styles.linearStyle}
          stystart={{ x: 1, y: 1 }}
          end={{ x: 1, y: 1 }}
          colors={['#FFC55D', '#BB934B']}
        />
        <Text>{boxTip}</Text>
      </View>
    );
  }
}
const styles = StyleSheet.create({
  twoBox: {
    width: px2dp(155) * 2,
    height: px2dp(282),
    backgroundColor: '#FFFFFF',
    borderRadius: px2dp(12) * 2,
    justifyContent: 'center',
    alignItems: 'center'
  },
  linearStyle: {
    width: px2dp(16) * 2,
    height: px2dp(2) * 2,
    borderRadius: px2dp(2),
    marginTop: px2dp(12) * 2,
    marginBottom: px2dp(12) * 2
  },
  numStyle: {
    color: '#343332',
    fontSize: px2dp(28) * 2
  },
  tipStyle: {
    color: '#999896',
    fontSize: px2dp(14) * 2
  }
});
